package site.jlopen.assets.shiro.token;

import org.apache.shiro.authc.HostAuthenticationToken;
import org.apache.shiro.authc.RememberMeAuthenticationToken;

import lombok.Data;
 
 
@Data
public class JwtToken implements HostAuthenticationToken, RememberMeAuthenticationToken {
    /**
	 * 
	 */
	private static final long serialVersionUID = -912815068929003155L;
	private String token;
    private char[] password;
    private boolean rememberMe = false;
    private String host;
 
    public JwtToken(String token){
        this.token = token;
    }
 
    @Override
    public String getHost() {
        return host;
    }
 
    @Override
    public boolean isRememberMe() {
        return rememberMe;
    }
 
    @Override
    public Object getPrincipal() {
        return token;
    }
 
    @Override
    public Object getCredentials() {
        return token;
    }
}
